package top.zackyoung.mybatisplus.query.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @version 1.0
 * @description:
 * @author: ZackYoung
 * @date: 2021/5/2 17:37
 */
@Data
public abstract  class  BaseEntity<T extends BaseEntity<?>> extends Model<T> {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(value = "update", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
